import React from 'react'
import './Group.less'
import { Link } from 'react-router-dom'
import { Carousel } from 'antd-mobile';
function Group(props) {
    let { grouplist } = props
    return (
        <div className="group">
            <h2 className="text">万人团</h2>
            <Carousel
                autoplay={true}
                infinite
                autoplayInterval={2500}
                dots={false}
            >
                {grouplist.map((item, index) => (
                    <Link
                        key={item.id}
                        to={"/detail/" + item.id + "/2"}
                    >
                        <img
                            title={item.goodsname}
                            src={item.img}
                            alt=""
                            style={{ width: '100%', verticalAlign: 'top' }}
                        />
                        <p className="price_text">{item.goodsname}</p>
                        <p>￥{item.price}元</p>
                        <del>￥{item.market_price}</del>
                    </Link>

                ))}
            </Carousel>
        </div>
    )
}
export default React.memo(Group)
